package com.ericsson.mhealth.server.config;

import com.ericsson.mhealth.gvf.GVFManager;
import com.ericsson.mhealth.server.config.annotations.Log4JTypeListener;
import com.ericsson.mhealth.server.config.providers.GsonProvider;
import com.ericsson.mhealth.server.config.providers.SmartGVFManagerProvider;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import com.google.inject.matcher.Matchers;

public class BusinessLogicModule extends AbstractModule {

	@Override
	protected void configure() {
		bind(GsonBuilder.class);
		bind(Gson.class).toProvider(GsonProvider.class).in(Singleton.class);
		bind(GVFManager.class).toProvider(SmartGVFManagerProvider.class).in(Singleton.class);
		bindListener(Matchers.any(), new Log4JTypeListener());
	}

}
